$def with (image, showinfo=True)

$putctx("cssfile", "form")
$putctx("show_ol_shell", False)

<div class="saved-image-container">
    <div class="imagePost">
        $if image:
            <img src="$image.url(size='M')" class="cover" width="200" alt="$_('New book cover')"/>
    </div>

    <div class="imageSaved" data-image-id="$(image and image.id)">
        <div class="saved">$_("Saved!")</div>
        <div class="meta">
            $if showinfo:
                <strong>$_("Notes:")</strong><br/>
                $ d = image.info()
                $if d:
                    $if d.author:
                        Uploaded by <a href="$d.author.key">$d.author.name</a> on $format_date(d.created)<br/>
                    $else:
                        Uploaded anonymously on $datestr(d.created)<br/>
                    $if d.source_url:
                        <a href="$d.source_url" target="_blank">$d.source_url</a><br/>
                <br/>
            <a href="$changequery()" class="imageSaved__button"><button class="cta-btn cta-btn--vanilla">$_("Add another image")</button></a>
            <button type="button" name="finished" value="Finished" class="largest cta-btn cta-btn--primary popClose">$_("Finished")</button>
        </div>
    </div>
</div>
